<?php
include("../inc/global.inc");
include("../steps.php");

$totalrecord=@mysql_result(@mysql_query("select count(id) from job_per_search where member_id='$_COOKIE[job_user_id]'"),0);
if($totalrecord>=5){
echo "<script>alert('搜索器已满');location='search_manage.php'</script>";
}

if($_POST[act]){
@mysql_query("insert into job_per_search (member_id,p_class_1,p_class_2,p_hy,p_city,p_nature,p_salary,p_exp,p_edu,p_title,p_date)  values ('$_COOKIE[job_user_id]','$_POST[job_class]','$_POST[job_smill]','$_POST[job_hy]','$_POST[p_qw_city]','$_POST[p_nature]','$_POST[p_salary]','$_POST[p_exp]','$_POST[p_edu]','$_POST[keywords]','$_POST[p_date]')");




echo "<script>alert('保存成功');location='search_add.php'</script>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加搜索器-我的搜索器-三帝招聘网</title>
<link href="../css/body.css" rel="stylesheet" type="text/css"/>
<link href="../css/link.css" rel="stylesheet" type="text/css"/>
<link href="css/head.css" rel="stylesheet" type="text/css"/>
<link href="css/main.css" rel="stylesheet" type="text/css"/>
<link href="../css/foot.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://www.sandib2b.cn/js/job_class.js" charset="gb2312"></script>
<script type="text/javascript" src="http://www.sandib2b.cn/js/city.js" charset="gb2312"></script>
</head>
<body>
<?php include("../inc/top.php");?>
<div class="menuBox1">
<a href="/member/">管理中心</a>
<a href="/member/show.php">我的简历</a>
<a href="/member/search_manage.php">我的搜索器</a>
<a href="/member/favorites.php">收藏夹</a>
<a href="/member/cqjob.php">发件夹</a>
<a href="/member/inbox.php">收件夹</a>
<div class="onl"></div>
</div>
<div id="mian">
<div class="rightmain">
<?php include("right_s.php")?>
</div>
<div id="box">
  <div class="JobBox sideyellow backyellow">
<div class="mian_Co">
  <div class="title size14 topside6"><strong>添加搜索</strong></div>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
  <form id="form1" name="form1" method="post" action="" onsubmit="return checkform()">
    <tbody>
      <tr>
        <td height="25" colspan="4" align="left">　选择职位类别、行业、地区、职位 </td>
        </tr>
      <tr>
        <td width="12%" height="25" align="right"><font color="#FF0000">*</font>职位类别：</td>
        <td width="48%" align="left">
		  <select name="job_class" id="job_class" onChange="changejobtype(document.form1.job_class.options[document.form1.job_class.selectedIndex].value)" style="width:160px;">
                              <option value="">选择、修改</option>
							  <?php
							     $rs=@mysql_query("select * from job_class  where j_c_id=0");
								 while($row=@mysql_fetch_array($rs)){
							  ?><option value="<?=$row['id']?>"><?=$row[j_c_name]?></option>
							  <?php }?>
                  </select>&nbsp;&nbsp;<select name="job_smill" id="job_smill" style="width:160px;">
                              <option value="">选择、修改</option>
			    </select></td>
        <td width="12%" align="center"><font color="#FF0000">*</font>行业类别：</td>
        <td width="28%"><select name="job_hy" id="job_hy" style="width:160px;">
                            <option value="">选择、修改</option>
							  <?php
							     $rs=@mysql_query("select * from job_hy where job_hy_id=0");
								 while($row=@mysql_fetch_array($rs)){
							  ?><option value="<?=$row['id']?>"><?=$row[job_hy_name]?></option>
							  <?php }?>
                </select></td>
      </tr>
      <tr>
        <td height="25" align="right"><font color="#FF0000">*</font>工作地点：</td>
        <td align="left"><select  name="c_provinces4" id="c_provinces4" onChange="changecity4(document.form1.c_provinces4.options[document.form1.c_provinces4.selectedIndex].value)" style="width:80px;">
            <option value="">省份</option>
          <?php
          $result = mysql_query("select * from city where city_id=0");    
          while($res = mysql_fetch_array($result)){    
          ?>    
          <option value="<?=$res['id']?>"><?=$res['city_name']?></option> 
          <?php }?>   
       </select>
       <select name="c_city4" id="c_city4" onChange="changecity5(document.form1.c_city4.options[document.form1.c_city4.selectedIndex].value)" style="width:80px;">
            <option value="">城市</option>
       </select></td>
        <td align="center">发布日期：</td>
        <td><select name="p_date" style="width: 70%;">
          <option value="0">不限</option>
		  <option value="1">近1天</option>
		  <option value="3">近3天</option>
		  <option value="7">近7天</option>
		  <option value="15">近15天</option>
		  <option value="20">近20天</option>
		  <option value="30">近30天 </option>
        </select></td>
      </tr>   
      <tr>
        <td height="25" align="right"><font color="#FF0000">*</font>工作性质：</td>
        <td align="left"><input id="p_nature" type="radio" checked="checked" value="1" name="p_nature" />
          全职
          <input id="p_nature" type="radio" value="2" name="p_nature" />
          兼职
          <input id="p_nature" type="radio" value="3" name="p_nature" />
          实习</td>
        <td align="center">月薪范围：</td>
        <td align="left"><select id="p_salary" name="p_salary">
            <option value="1">面谈</option>
            <option value="2">1000元/月以下</option>
            <option value="3">1000-2000元/月</option>
            <option value="4">2001-4000元/月</option>
            <option value="5">4001-6000元/月</option>
            <option value="6">6001-8000元/月</option>
            <option value="7">8001-10000元/月</option>
            <option value="8">10001-15000元/月</option>
            <option value="9">15000-25000元/月</option>
            <option value="10">25000元/月以上</option>
        </select></td>
      </tr>
      <tr>
        <td height="25" align="right">工作经验：</td>
        <td align="left"><select id="p_exp" name="p_exp">
            <option value="1" selected="selected">无</option>
            <option value="2">1年以下</option>
            <option value="3">1-2年</option>
            <option value="4">3-5年</option>
            <option value="5">6-7年</option>
            <option value="6">8-10年</option>
            <option value="7">10年以上</option>
        </select></td>
        <td align="center">学　　历：</td>
        <td align="left"><select name="p_edu">
            <option value="1" >不限</option>
            <option value="2">高中及高中以下</option>
			<option value="3">技校</option>
			<option value="4">中专</option>
            <option value="5">大专</option>
            <option value="6">本科</option>
            <option value="7">硕士</option>
            <option value="8">博士及以上</option>
        </select></td>
      </tr>
      <tr>
        <td height="25" align="right"><font color="#FF0000">*</font>搜索器名：</td>
        <td><input name="keywords" type="text"  size="20" maxlength="100"/></td>
        <td align="center">&nbsp;</td>
        <td align="left">&nbsp;</td>
      </tr>
      <tr>
        <td height="25" align="right">&nbsp;</td>
        <td align="left"><input type="hidden" name="act" value="job.sandib2b.cn" /><input name="Submit" type="submit" class="inputbut" value=" 保 存 " /></td>
        <td align="center">&nbsp;</td>
        <td align="left">&nbsp;</td>
      </tr>
      <tr>
        <td height="25" align="right">&nbsp;</td>
        <td>&nbsp;</td>
        <td align="center">&nbsp;</td>
        <td align="center">&nbsp;</td>
		</tr>
		<tr>
		  <td height="43" align="right">&nbsp;</td>
		  <td><label></label></td>
		  <td align="center">&nbsp;</td>
		  <td align="center">&nbsp;</td>
		  </tr>
		<tr>
		  <td height="25" align="right">&nbsp;</td>
		  <td>&nbsp;</td>
		  <td align="center">&nbsp;</td>
		  <td align="center">&nbsp;</td>
		  </tr>
    </tbody></form>
  </table>
</div>
</div>
<div class="onl"></div>
<div class="onl"></div>
</div>
<div class="onl"></div>
</div>
<?php include("../inc/foot.php");?>
</body>
</html>
<script language="javascript">
function $(id){
return document.getElementById(id);
}
function checkform(){
if($("job_class").value==""){
alert("请选择职位");
$("job_class").focus();
return false;
}
if($("job_smill").value==""){
alert("请选择职位");
$("job_smill").focus();
return false;
}
if($("job_hy").value==""){
alert("请选择行业");
$("job_hy").focus();
return false;
}

if($("c_provinces4").value==""){
alert("请选择省份");
$("c_provinces4").focus();
return false;
}
if($("c_city4").value==""){
alert("请选择城市");
$("c_city4").focus();
return false;
}

if($("keywords").value==""){
alert("搜索器名不能为空");
$("keywords").focus();
return false;
}
}
</script>